﻿
using UnityEngine;
using System;
using System.IO;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace FrameWorkSong
{
    public class Exporter
    {
#if UNITY_EDITOR
        [MenuItem("FrameWorkSong/FrameWork/1.导出版本 %e",false,1)]
        private static void MenuClicked()
        {
            string assetPathName = "Assets/FrameWorkSong";//这个路径等于Path.Combine(Application.dataPath, "../")
            string packgeName = "FrameWorkSong_" + DateTime.Now.ToString("yyyyMMdd_HH")+".unitypackage";
            GUIUtility.systemCopyBuffer = packgeName;
            AssetDatabase.ExportPackage(assetPathName, packgeName, ExportPackageOptions.Recurse);
            Application.OpenURL(Path.Combine(Application.dataPath, "../"));//打开的是Application.dataPath的上级目录
        }
#endif
    }
}
